package org.oncase.smcase.entity;

import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

@Entity
@Table(name="bsc_objective")
@SequenceGenerator(name="bsc_objective_seq",sequenceName="bsc_objective_seq")
public class Objective {
	
	@Id
	@GeneratedValue(generator="bsc_objective_seq")
	private Integer id;
	
	@Column(nullable=false)
	private String name;
	
	@Column(nullable=false, length=1024)
	private String description;
	
	private String attribute;
	
	private String dataOrignDescription;
	
	private String criticalFactors;
	
	@Column(nullable=false)
	private String indicators;
	
	@OneToOne
	private Frequency frequency;
	
	@Column(nullable=false)
	private String targets;
	
	private String upperTolerance;
	
	private String lowerTolerance;
	
	@OneToMany
	private List<Activity> activities;

	public Objective() {
		super();
	}

	public Objective(String name, String description, String indicators,
			Frequency frequency, String targets) {
		super();
		this.name = name;
		this.description = description;
		this.indicators = indicators;
		this.frequency = frequency;
		this.targets = targets;
	}

	public List<Activity> getActivities() {
		return activities;
	}

	public void setActivities(List<Activity> activities) {
		this.activities = activities;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getAttribute() {
		return attribute;
	}

	public void setAttribute(String attribute) {
		this.attribute = attribute;
	}

	public String getDataOrignDescription() {
		return dataOrignDescription;
	}

	public void setDataOrignDescription(String dataOrignDescription) {
		this.dataOrignDescription = dataOrignDescription;
	}

	public String getCriticalFactors() {
		return criticalFactors;
	}

	public void setCriticalFactors(String criticalFactors) {
		this.criticalFactors = criticalFactors;
	}

	public String getIndicators() {
		return indicators;
	}

	public void setIndicators(String indicators) {
		this.indicators = indicators;
	}

	public Frequency getFrequency() {
		return frequency;
	}

	public void setFrequency(Frequency frequency) {
		this.frequency = frequency;
	}

	public String getTargets() {
		return targets;
	}

	public void setTargets(String targets) {
		this.targets = targets;
	}

	public String getUpperTolerance() {
		return upperTolerance;
	}

	public void setUpperTolerance(String upperTolerance) {
		this.upperTolerance = upperTolerance;
	}

	public String getLowerTolerance() {
		return lowerTolerance;
	}

	public void setLowerTolerance(String lowerTolerance) {
		this.lowerTolerance = lowerTolerance;
	}

}
